package com.ssm.model;

import java.util.Date;
//回复表
public class Reply {

	private Integer id;
	private Integer user_id;
	private String content;
	private Date creat_time;
	//回复对应评论者的id
	private Integer comment_id;
	//回复对应的回复的id
	private Integer reply_id;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getUser_id() {
		return user_id;
	}

	public void setUser_id(Integer userId) {
		user_id = userId;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreat_time() {
		return creat_time;
	}

	public void setCreat_time(Date creatTime) {
		creat_time = creatTime;
	}

	public Integer getComment_id() {
		return comment_id;
	}

	public void setComment_id(Integer commentId) {
		comment_id = commentId;
	}

	public Integer getReply_id() {
		return reply_id;
	}

	public void setReply_id(Integer replyId) {
		reply_id = replyId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((comment_id == null) ? 0 : comment_id.hashCode());
		result = prime * result + ((content == null) ? 0 : content.hashCode());
		result = prime * result
				+ ((creat_time == null) ? 0 : creat_time.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result
				+ ((reply_id == null) ? 0 : reply_id.hashCode());
		result = prime * result + ((user_id == null) ? 0 : user_id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Reply other = (Reply) obj;
		if (comment_id == null) {
			if (other.comment_id != null)
				return false;
		} else if (!comment_id.equals(other.comment_id))
			return false;
		if (content == null) {
			if (other.content != null)
				return false;
		} else if (!content.equals(other.content))
			return false;
		if (creat_time == null) {
			if (other.creat_time != null)
				return false;
		} else if (!creat_time.equals(other.creat_time))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (reply_id == null) {
			if (other.reply_id != null)
				return false;
		} else if (!reply_id.equals(other.reply_id))
			return false;
		if (user_id == null) {
			if (other.user_id != null)
				return false;
		} else if (!user_id.equals(other.user_id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Reply [comment_id=" + comment_id + ", content=" + content
				+ ", creat_time=" + creat_time + ", id=" + id + ", reply_id="
				+ reply_id + ", user_id=" + user_id + "]";
	}

}
